package com.xingkeduo.dto.transter.activitycardlist;

import org.apache.commons.lang.StringUtils;

import com.alibaba.fastjson.JSONObject;
import com.xingkeduo.utils.DateUtils;

import lombok.Data;

@Data
public class ActivityCardListParameterDto {
	private String f_user_id;	
	private String store_id;	
	private String total_price;
	private String service_type;	
	private String time;
	private String token;	
	private String mobile_type;	
	private String admin_id;//：发型师ID，
	private String appointment_date;//：预约时刻
	private String appointment_time;//：预约时刻
	
	public String covert() {
		JSONObject json =new JSONObject();
		json.put("storeId",store_id);
		json.put("userId",f_user_id);
		json.put("hairServiceId",service_type);//服务ID
		json.put("hairServiceOriginPrice",total_price);//服务价格
		String appointmentDate = StringUtils.isBlank(appointment_date) ? DateUtils.getDate():appointment_date;
		String date = DateUtils.formatDate(DateUtils.parseDate(appointmentDate+" "+appointment_time),DateUtils.DEFAULT_DATE_TIME_FORMAT);
		json.put("appointmentDate",date);//预约时间
		return json.toJSONString();
    }
}
